
import java.io.PrintWriter;
import java.util.HashMap;

class PrintList extends Node {
	private Node literal_;
	private Node literal_list_;

	public PrintList(Node l, Node ll) {
		literal_ = l;
		literal_list_ = ll;
	}

	public PrintList(Node l) {
		literal_ = l;
	}

	@Override
	public void print(PrintWriter pw) {
		pw.println("Node name : PrintList");
		System.out.println("literal: " + literal_);
		literal_.print(pw);
		if (literal_list_ != null) {
			literal_list_.print(pw);
		}
	}

	@Override
	public String translate(HashMap<String, PrintWriter> pws, String condition, SymbolTable st,
			String parent) {
		String key = st.getStack().get(1);
		PrintWriter pw = pws.get(key);
		literal_.translate(pws,null,st,null);
		if(literal_list_ != null){
			literal_list_.translate(pws,null,st,null);
		}
		return null;
	}
}